package com.overoid.diary.ui.common;

import com.overoid.diary.HomeActivity;
import com.overoid.diary.R;
import com.overoid.diary.ui.DayActivity;
import com.overoid.diary.ui.MemoActivity;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.Window;

 public class TabActivityImpl extends TabActivity implements CommonMenu{
    
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		
		
		//mLocalActivityManager = new LocalActivityManager(this, singleActivityMode);

	}
	
	public boolean onCreateOptionsMenu(Menu menu) {
    	new MenuInflater(this).inflate(R.menu.main, menu);
		return(super.onCreateOptionsMenu(menu));
	}
    
    
public boolean onOptionsItemSelected(MenuItem item) {
		
		switch (item.getItemId()) {
		
		case R.id.Home: 
			Intent home = new Intent(this,HomeActivity.class);
			startActivity(home);	
			break;
		case R.id.Day: 
			Intent day = new Intent(this,DayActivity.class);
			startActivity(day);	
			break;
		case R.id.Memo: 
			Intent memo = new Intent(this,MemoActivity.class);
			startActivity(memo);	
			break;
		}
		return(super.onOptionsItemSelected(item));
	}
}
